using System;
using System.ComponentModel.DataAnnotations;

namespace RBDD.Embol.AccesoDatos.Entidades
{
 public partial class Usuario
 {
     public Usuario()
     {
     }
     #region foreign Keys

     public int HistorialSessionId_FK {get;set;}
     private HistorialSession HistorialSessionId_obj ;
     public virtual HistorialSession HistorialSession
      {
          get { return HistorialSessionId_obj; }
          set {
                HistorialSessionId_obj = value;
                if (HistorialSessionId_obj != null) HistorialSessionId_FK = HistorialSessionId_obj.Id; 
          }
      }

     public int PersonaId_FK {get;set;}
     private Persona PersonaId_obj ;
     public virtual Persona Persona
      {
          get { return PersonaId_obj; }
          set {
                PersonaId_obj = value;
                if (PersonaId_obj != null) PersonaId_FK = PersonaId_obj.Id; 
          }
      }

     public int RolId_FK {get;set;}
     private Rol RolId_obj ;
     public virtual Rol Rol
      {
          get { return RolId_obj; }
          set {
                RolId_obj = value;
                if (RolId_obj != null) RolId_FK = RolId_obj.Id; 
          }
      }
     #endregion
     public virtual int   Id { get; set;}

     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Nombre")]
     public virtual string   Nombre { get; set;}

     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Contrasena")]
     public virtual string   Contrasena { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Descripcion")]
     public virtual string   Descripcion { get; set;}
 }
}

